import request from '/@/utils/request';

/**
 * 实验管理
 * @param params 要传的参数值
 * @returns 返回接口数据
 * @method experimentTeacherInfo 实验教师信息
 * @method experimentStudentInfo 实验学生信息
 * @method updateExperimentInfo 更新实验信息
 * @method getExperimentInfo 查询实验信息
 */

export function experimentTeacherInfo(params: any) {
	return request({
		url: `experiment?Page=${params.Page}&teacher_id=${params.teacher_id}`,
		method: 'get',
	});
}

export function experimentStudentInfo(params: any) {
	return request({
		url: `experiment?Page=${params.Page}&lesson_id=${params.lesson_id}`,
		method: 'get',
	});
}

export function updateExperimentInfo(params: any) {
	return request({
		url: `experiment/update/${params.experiment_id}`,
		method: 'put',
		data: params.info,
	});
}

export function getExperimentInfo(params: any) {
	return request({
		url: `experiment?experiment_id=${params.experiment_id}&experiment_name=${params.experiment_name}&Page=${params.Page}`,
		method: 'get',
	});
}